<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-type" data-rule="required" class="form-control selectpicker" name="row[type]">
                {foreach name="typeList" item="vo"}
                    <option value="{$key}" {in name="key" value="$row.type"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Mch_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-mch_id" data-rule="required" class="form-control" name="row[mch_id]" type="text" value="{$row.mch_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Secret_key')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-secret_key" data-rule="required" class="form-control" name="row[secret_key]" type="text" value="{$row.secret_key|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('P12file')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-p12file" data-rule="required" class="form-control" size="50" name="row[p12file]" type="text" value="{$row.p12file|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-p12file" class="btn btn-danger faupload" data-input-id="c-p12file" data-multiple="false" data-preview-id="p-p12file"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-p12file" class="btn btn-primary fachoose" data-input-id="c-p12file" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-p12file"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-p12file"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Certfile')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-certfile" data-rule="required" class="form-control" size="50" name="row[certfile]" type="text" value="{$row.certfile|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-certfile" class="btn btn-danger faupload" data-input-id="c-certfile" data-multiple="false" data-preview-id="p-certfile"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-certfile" class="btn btn-primary fachoose" data-input-id="c-certfile" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-certfile"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-certfile"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Keyfile')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-keyfile" data-rule="required" class="form-control" size="50" name="row[keyfile]" type="text" value="{$row.keyfile|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-keyfile" class="btn btn-danger faupload" data-input-id="c-keyfile" data-multiple="false" data-preview-id="p-keyfile"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-keyfile" class="btn btn-primary fachoose" data-input-id="c-keyfile" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-keyfile"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-keyfile"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Shop_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-shop_id" data-rule="required" data-source="wanlshop/shop/index" data-field="shopname" class="form-control selectpage" name="row[shop_id]" type="text" value="{$row.shop_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">设为默认:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-is_default" data-rule="required" class="form-control" name="row[is_default]" type="number" value="{$row.is_default|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">设为轮询可用:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-available" data-rule="required" class="form-control" name="row[available]" type="number" value="{$row.available|htmlentities}">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
